<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Logs</title>
		<link rel="stylesheet" type="text/css" href="styles.css" />
		<script src="js/jquery-1.2.1.js">
		</script>

	</head>
	<body>
			<script>
		function FP_openNewWindow(w, h, nav, loc, sts, menu, scroll, resize, name, url){//v1.0
			var windowProperties = '';
			if (nav == false) 
				windowProperties += 'toolbar=no,';
			else 
				windowProperties += 'toolbar=yes,';
			if (loc == false) 
				windowProperties += 'location=no,';
			else 
				windowProperties += 'location=yes,';
			if (sts == false) 
				windowProperties += 'status=no,';
			else 
				windowProperties += 'status=yes,';
			if (menu == false) 
				windowProperties += 'menubar=no,';
			else 
				windowProperties += 'menubar=yes,';
			if (scroll == false) 
				windowProperties += 'scrollbars=no,';
			else 
				windowProperties += 'scrollbars=yes,';
			if (resize == false) 
				windowProperties += 'resizable=no,';
			else 
				windowProperties += 'resizable=yes,';
			if (w != "") 
				windowProperties += 'width=' + w + ',';
			if (h != "") 
				windowProperties += 'height=' + h;
			if (windowProperties != "") {
				if (windowProperties.charAt(windowProperties.length - 1) == ',') 
					windowProperties = windowProperties.substring(0, windowProperties.length - 1);
			}
			window.open(url, name, windowProperties);
		}
	</script>
		<div id="logheader" class="logheader">LOGS<br>
		<input class="logbutton" type="button" name="Opslaan" value="Log Downloaden" OnCLick="location.href='download.php?dir=logs/&bestand=basis.log'"><input class="logbutton" type="button" name="Afdrukken" value="Log Afdrukken" OnCLick="$('#logheader').hide('slow');window.print();"><input class="logbutton" type="button" name="Leegmaken" value="Log leegmaken" OnClick="FP_openNewWindow('600', '200', false, false, false, false, false, false, 'aspraakskes', /*href*/'leegBestand.fnc.php?file=logs/basis.log')">
		</div><br \>
		<div class="logs">
<?php
include('functions.inc.php');
$logfile = "logs/basis.log";
$openlog = fopen($logfile, 'r') or die ('logfile niet gevonden!');
$log = fread($openlog, filesize($logfile));
fclose($openlog);
$log = nl2br($log);
$log = preg_replace("#<R:\!#si", "<span style='color: red;'>", $log);
$log = preg_replace("#\!:R>#si", "</span>", $log);
$log = preg_replace("#<G:\!#si", "<span style='color: green;'>", $log);
$log = preg_replace("#\!:G>#si", "</span>", $log);
$log = preg_replace("#<O:\!#si", "<span style='color: orange;'>", $log);
$log = preg_replace("#\!:O>#si", "</span>", $log);
echo$log;

?>
</div>
	</body>
</html>
